Skip to main content

FlowTrigger

The FlowTrigger class is responsible for triggering a flow within a workflow system. It manages the flow's project, parameters, starter user, and execution behavior.

Properties

NameDescription
KeyA unique identifier for the workflow step.
WorkflowCodeInstanceThe workflow code instance associated with the flow object.
ParentProcessIdThe ID of the parent process for this flow trigger.
CachedDMObjectsThe cached document management objects related to the flow object.
ProjectNameThe name of the project to which this flow trigger belongs.
ProjectIdThe ID of the project to which this flow trigger belongs.
TypeCodeThe type code associated with the flow object.
FlowIdThe ID of the flow associated with this trigger.
NameName for the workflow step.
StarterUserThe user who starts the flow.
StarterUserTypeThe type of the starter user (e.g., UserId or UserName).
ParametersA dictionary of flow parameters associated with this flow trigger.
SourceThe source options for the flow trigger.
ShowFlowHistoryDetermines whether to show the flow's history.
TriggeredProcessCountVariableThe variable to store the count of triggered processes.
CaptionThe caption dictionary representing localized captions for the flow object.
FlowNameThe name of the flow associated with this trigger.

Constructors

NameDescription
FlowTrigger(name, workflowData, workflowCodeInstance)Constructor for the FlowTrigger class. Initializes a new instance of the FlowTrigger class.
FlowTrigger(name, workflowData, workflowCodeInstance)Constructor for the FlowTrigger class. Initializes a new instance of the FlowTrigger class.

Methods

NameDescription
Initialize()Initializes the flow trigger. This method is an implementation of the abstract Initialize method from the base class.
SetParentProcessId(parentProcessId)Sets the parent process ID for this flow trigger.
Execute(workflowUserContext, processResponse)Executes the flow trigger by resolving source data and starting the associated flow.
GetParentProcessId()Returns the parent process ID if available, otherwise returns 0.

Events

NameDescription
OnBeforeExecution(sender, args)Occurs before the execution of the workflow step.
OnAfterExecution(sender, args)Occurs after the execution of the workflow step.

Generic Types

NameDescription
TPropertiesGeneric type of properties.